<%@ page language="java" contentType="text/html; charset=UTF-8"
	pageEncoding="UTF-8"%>
<%@ include file="/common/include/page.jsp"%>
<c:set value="${requestScope.response.data.list }" var="list"/>
<jsp:useBean class="com.sys.users.pojo.AUsers" id="pojo"/>
<!DOCTYPE html>
<html lang="en">
	<head>
		<title>下单 - 电子产品销售系统</title>
		<%@ include file="/common/include/head_title.jsp"%>
	</head>
	<body>
		<jsp:include page="/header.htm"></jsp:include>
		<div id="mainBody">
			<div class="container">
				<div class="row">
					<%@ include file="/common/include/leftBar.jsp"%>
					<form class="form-horizontal" method="post" action="${rootPath }/head/orders/ordersInsertSubmit.htm">
					<div class="span9">
						<ul class="breadcrumb">
							<li><a href="${rootPath }/main.htm">首页</a><span class="divider">/</span></li>
							<li class="active">个人中心</li>
						</ul>
						<table class="table table-bordered">
							<tbody>
								<tr>
									<th>收货信息</th>
								</tr>
								<tr>
									<td>
										<input type="hidden" name="operType" value="${param.operType }">
										<div class="control-group">
											<label class="control-label" for="receName">收货人姓名</label>
											<div class="controls">
												<input type="text" id="receName" placeholder="收货人姓名" name="receName" value="${one.receName}">
											</div>
										</div>
										<div class="control-group">
											<label class="control-label" for="recePhone">收货人手机</label>
											<div class="controls">
												<input type="text" id="recePhone" placeholder="昵称" name="recePhone" value="${one.recePhone}">
											</div>
										</div>
										<div class="control-group">
											<label class="control-label" for="receAddress">收货人地址</label>
											<div class="controls">
												<input type="text" id="receAddress" placeholder="真实姓名" name="receAddress" value="${one.receAddress}">
											</div>
										</div>
										<div class="control-group">
											<label class="control-label" for="content">备注</label>
											<div class="controls">
												<input type="text" id="content" placeholder="备注" name="content" value="${one.content}">
											</div>
										</div>
									</td>
								</tr>
							</tbody>
						</table>
						<table class="table table-bordered">
							<thead>
								<tr>
									<th>序号</th>
									<th>商品</th>
									<th>单价</th>
									<th>数量</th>
									<th>总金额</th>
								</tr>
							</thead>
							<tbody>
								<c:set value="0" var="totalMoney"/>
								<c:forEach items="${list }" var="listTemp" varStatus="stat">
									<tr>
										<td>${stat.count }</td>
										<td title="${listTemp.goods.name }">
											<a href="${rootPath }/goodsInfo.htm?id=${listTemp.goodsId}" target="_blank">
												${fn:substring(listTemp.goods.name,0,subStrLen) }
											</a>
										</td>
										<td>${listTemp.goods.price }</td>
										<td>${listTemp.num }</td>
										<td>${listTemp.goods.price * listTemp.num }</td>
										<c:set value="${totalMoney + listTemp.goods.price * listTemp.num }" var="totalMoney"/>
									</tr>
								</c:forEach>
								<tr>
									<td colspan="4" style="text-align: right">
										<strong>总价格 =</strong></td>
									<td class="label label-important" style="display: block">
										<strong>${totalMoney }</strong></td>
								</tr>
							</tbody>
						</table>
						<button type="submit" class="btn btn-large pull-right">
							下单 <i class="icon-arrow-right"></i>
						</button>
					</div>
					</form>
				</div>
			</div>
		</div>
		<%@ include file="/common/include/head_footer.jsp"%>
	</body>
</html>